package com.zjf.bbs.struts.action.oa;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.springframework.stereotype.Controller;

import com.zjf.bbs.dao.AskDao;
import com.zjf.bbs.entity.Ask;
import com.zjf.bbs.struts.formbean.oa.VerifyForm;
@Controller(value="/control/oa/verifyAskUI")
public class VerifyAskUIAction extends Action {
	@Resource(name="askDao")
	private AskDao askDao;

	@Override
	public ActionForward execute(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response)
			throws Exception {
		VerifyForm f = (VerifyForm) form;
		Ask data = askDao.get(Ask.class, f.getId());
		
		
		request.setAttribute("id",f.getId());
		request.setAttribute("data", data);
		return mapping.findForward("ui");
	}
}
